home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 2.5 KB | 91 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWODExce.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: © 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWODEXCE_H
- #define FWODEXCE_H
-
- #ifndef FWEXCLIB_H
- #include "FWExcLib.h"
- #endif
-
- // ----- OpenDoc Includes -----
-
- // This file included here to satisfy the kludgy OpenDoc hack
- // wherein AltPoint.h must be included before ODTypes.h
- #ifndef _ALTPOINT_
- #include <AltPoint.h>
- #endif
-
- #ifndef _ODTYPES_
- #include <ODTypes.h>
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- //========================================================================================
- // Forward declarations
- //========================================================================================
-
- struct Environment;
-
- //========================================================================================
- // Macros
- //========================================================================================
-
- #ifdef SOMCHKEXCEPT
- #undef SOMCHKEXCEPT
- #endif
-
- #define SOMCHKEXCEPT ::FW_FailODError(ev)
-
- //========================================================================================
- // Global functions
- //========================================================================================
-
- FW_FUNC_ATTR void FW_FailODError(Environment* ev);
- FW_FUNC_ATTR void FW_SetODException(Environment* ev, ODError error);
- FW_FUNC_ATTR ODError FW_GetODException(Environment* ev);
- FW_FUNC_ATTR void FW_SetException(Environment *ev, const FW_XException& exception);
-
- //========================================================================================
- // CLASS FW_XOpenDocException
- //========================================================================================
-
- class FW_CLASS_ATTR FW_XOpenDocException : public FW_XException
- {
- public:
- FW_XOpenDocException(Environment* ev);
- FW_XOpenDocException(ODError error);
- virtual ~FW_XOpenDocException();
-
- Environment* GetEnvironment() const;
- ODError GetODError() const;
-
- FW_DECLARE_EXCEPTION(FW_XOpenDocException)
- private:
- Environment* fEv;
- };
-
- //----------------------------------------------------------------------------------------
- // FW_XOpenDocException::GetEnvironment
- //----------------------------------------------------------------------------------------
-
- inline Environment* FW_XOpenDocException::GetEnvironment() const
- {
- return fEv;
- }
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
- #endif
-